<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title>tencent</title>
    <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
    <script src="http://ynwx.yungov.cn/webchat/static/js/jquery.md5.js" ></script>

</head>

<body>

<form method="post" action="${us.url}"  >
    <div style="display: none">
        <input type="text" id="appid" name="appid" value='${us.appid}'/>
        <input type="text" id="signature" name="signature" value='${us.signature}' />
        <input type="text" id="redirect" name="redirect" value='${us.redirect}'/>
        <input type="text" id="uid" name="uid" value='${us.uid}'/>
        <input type="text" id="type" name="type" value='${us.type}'/>
        <input type="text" id="sig" name="sig" value='${us.sig}'/>
        <input type="submit" id="confirm" value="submit">
    </div>
</form>




<script type="text/javascript">



    function createSig(params) {

            var sig = "";
            for (var key in params) {
                sig += params[key] + "-"
            }
            sig += "authkey";
            console.log(sig);
            sig = $.md5(sig);
            console.log(sig);
            return sig;

    }
    var url = "${us.url}";
    var args = {
        "appid": '${us.appid}',
        "signature":'${us.signature}',
        "redirect": '${us.redirect}',
        "uid" : '${us.uid}',
        "type" : 0
    };
    var sig = createSig(args);
    args.sig = sig;
        $(function () {
        $('#confirm').click();
    });


</script>
</body>
</html>